<%@ page language="java" pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<%@ include file="/commons/jsp/taglibs.jsp"%>
<%@taglib uri="http://www.framework.com/taglib" prefix="frame"%>
  <head>
	<title>项目评审表 </title>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<!-- 样式文件的引入 -->
	<link href="${ctx}/commons/css/style.css" rel="stylesheet" type="text/css"/>
	<link rel="stylesheet" type="text/css" href="${ctx}/commons/themes/default/easyui.css">
	<link rel="stylesheet" type="text/css" href="${ctx}/commons/themes/icon.css">
	<!-- jqueryUI JS文件的引入 -->
	<script type="text/javascript" src="${ctx}/commons/js/jquery-1.8.0.min.js"></script>
	<script type="text/javascript" src="${ctx}/commons/js/jquery.easyui.min.js"></script>
	<script type="text/javascript" src="${ctx}/commons/js/easyui-extends-validate.js"></script>
	<!-- jqueryUI国际化 -->
	<script type="text/javascript" src="${ctx}/commons/js/easyui-lang-zh_CN.js"></script>
	<!-- 开发使用的公用js方法 -->
	<script type="text/javascript" src="${ctx}/commons/js/common.js"></script>
	<!-- 开发国际化的引用，主要完成后台信息在前台提示的国际化，一定要放在最后 -->
	<script type="text/javascript">var ctx = '${ctx}';var actionExt = "action";var i18n = new Object();</script>
	<script src="${ctx}/commons/js/i18n/message_zh_CN.js" type="text/javascript"></script>

	<style>
		table {
			text-align: center;
            border-collapse:collapse;			
		}		
		td {
			border: 1px solid black;
		}
	</style>
	
	<object id=factory viewastext style="display:none"
		classid="clsid:1663ed61-23eb-11d2-b92f-008048fdd814"
		codebase="ScriptX.cab#Version=6,3,435,20">
	</object>
	
	 <style media=print>  
     	 .PageNext{page-break-after: always;}  
    	 .Noprint{display:none;}   
     </style> 
         <script defer>
				// -------------------基本功能，可免费使用-----------------------
				factory.printing.header = "";//页眉
				factory.printing.footer = "";//页脚
				
				//factory.printing.SetMarginMeasure(1);//页边距单位，1为毫米，2为英寸
				//边距设置，需要注意大部分打印机都不能进行零边距打印，即有一个边距的最小值，一般都是6毫米以上
				//设置边距的时候时候如果设置为零，就会自动调整为它的最小边距
				//factory.printing.leftMargin = 7;//左边距
				//factory.printing.topMargin = 7;//上边距
				//factory.printing.rightMargin = 7;//右边距
				//factory.printing.bottomMargin = 7;//下边距
				factory.printing.portrait = false;//是否纵向打印，横向打印为false
				//--------------------高级功能---------------------------------------------
				//factory.printing.printer = "EPSON LQ-1600KIII";//指定使用的打印机
				//factory.printing.printer = "\\\\cosa-data\\HPLaserJ";//如为网络打印机，则需要进行字符转义
				factory.printing.paperSize = "A4";//指定使用的纸张
				//factory.printing.paperSource = "Manual feed";//进纸方式，这里是手动进纸
				factory.printing.copies = 1;//打印份数
				factory.printing.printBackground = false;//是否打印背景图片
				factory.printing.SetPageRange(false, 1, 3); //打印1至3页
				
				//---------------------常用函数--------------------------------
				factory.printing.Print(true);//无确认打印，true时打印前需进行确认
				factory.printing.PrintSetup();//打印设置
				factory.printing.Preview();//打印预览
				factory.printing.WaitForSpoolingComplete();//等待上一个打印任务完全送入打印池，在连续无确认打印时非常有用
				factory.printing.EnumPrinters(index);//枚举已安装的所有打印机，主要用于生成打印机选择功能
       </script>
  </head>
    
	
   <script type="text/javascript">
      $(function(){
    	  review();
      });
      
      function review(){
    	  $.ajax({
				type : "post",
				timeout : 20000,
				dataType : "json",
				url : "${ctx}/business/projectmanage/print/review?",
				data : {
					projectId:$("#projectId").val()
				},
				success : function(data){
					$("#content").html(data);
				}
         });
      }
      
      function doPrint() { 
    		bdhtml=window.document.body.innerHTML; 
    		sprnstr="<!--startprint-->"; 
    		eprnstr="<!--endprint-->"; 
    		prnhtml=bdhtml.substr(bdhtml.indexOf(sprnstr)+17); 
    		prnhtml=prnhtml.substring(0,prnhtml.indexOf(eprnstr)); 
    		window.document.body.innerHTML=prnhtml; 
    		pagesetup_null();
    		window.print(); 
    	}
    	function pagesetup_null(){
    		var hkey_root,hkey_path,hkey_key
    		hkey_root="HKEY_CURRENT_USER"
    		hkey_path="SoftwareMicrosoftInternet ExplorerPageSetup"
    		try{
    		var RegWsh = new ActiveXObject("WScript.Shell")
    		hkey_key="header" 
    		RegWsh.RegWrite(hkey_root+hkey_path+hkey_key,"")
    		hkey_key="footer"
    		RegWsh.RegWrite(hkey_root+hkey_path+hkey_key,"")
    		}catch(e){}
    	}
    	
    	function printTure()
    	//打印函数
    	{
    	//document.all("button").style.display="none";//隐藏按钮
    	 var currentBtn =document.getElementById("button1");
    	 var currentBtn2 =document.getElementById("button2");
    	 currentBtn.style.display="none";
    	// currentBtn2.style.display="none";
    	 factory.printing.Print(true);
    	//调用控件打印
    	//document.all("dayindiv").style.display="";//显示
    	}
    	
    	function printView()
    	//打印函数
    	{
    	//document.all("button").style.display="none";//隐藏按钮
    	 var currentBtn =document.getElementById("button1");
    	 var currentBtn2 =document.getElementById("button2");
    	 currentBtn.style.display="none";
    	// currentBtn2.style.display="none";
    	 factory.printing.Preview();
    	//调用控件打印
    	//document.all("dayindiv").style.display="";//显示
    	} 	
   </script>
<body>
     <div style="float:right">
        <a href="${ctx}/file_resource/activex_prt.zip">打印控件下载（请使用IE浏览器）</a>
		<!-- <input type="button"  id="button1" value="打印本页" onclick="printTure()">-->
		<div style="width: 100%;text-align: right;height: 40px;"><input type="button" id="button1" style="height: 30px;width: 80px;" value="打印" onclick="printTure();"/></div> 
		<!--<input type="button"  id="button2" value="打印预览" onclick="printView()">-->
	 </div>
    <input type ="hidden"  id="projectId" value="${projectId}"/>
   
    <div id="content"></div>
    
</body>

</html>
